package xyz.qduwo.servlet;


import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

@WebServlet(name = "MakeCanvasServlet", urlPatterns = { "/MakeCanvasServlet" })
public class MakeCanvasServlet extends HttpServlet{
    private static final long serialVersionUID = 1L;

    protected void doGet(HttpServletRequest request,
                         HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }

    protected void doPost(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException, IOException {
        String num = request.getParameter("num");
        System.out.println(num);
        HttpSession session = request.getSession(true);
        session.setAttribute("con_num", num);
        response.sendRedirect("canvas.jsp");
    }
}
